import request from '@/utils/request';

// 首页-政策直通车-统计查询
export async function getAppealStatistic(params: any): Promise<any> {
  return request.get(`/portal/getAppealStatistic`, {
    params,
  });
}
// 首页-政策直通车-诉求查询
export async function getAppealQuery(data: any): Promise<any> {
  return request.post(`/portal/getAppealByConditionPortal`, {
    data,
  });
}
// 个人中心-诉求查询
export async function getPersonalCenterAppealQuery(data: any): Promise<any> {
  return request.post(`/personalCenter/getAppealByConditionPersonalCenter`, {
    data,
  });
}
// 首页-政策直通车-新增诉求
export async function createAppeal(data: any): Promise<any> {
  return request(`/appeal/createAppeal`, {
    method: 'POST',
    data,
  });
}
//个人中心-诉求查询-查看详情
export async function getAppealInfoById(params: any): Promise<any> {
  return request(`/personalCenter/viewAppealById`, {
    method: 'GET',
    params,
  });
}
//个人中心-诉求查询-查看详情-提交满意度
export async function postSubmitAppealSatisfaction(data: any): Promise<any> {
  return request(`/personalCenter/createAppealSatisfaction`, {
    method: 'POST',
    data,
  });
}

// 首页-政策直通车-统计查询
export async function getSatisfactionStatistics(): Promise<any> {
  return request.get(`/portal/indexAppealSatisfactionStatistics`, {});
}
